//
//  SuggestViewController.m
//  HeartFM
//
//  Created by qianfeng on 15/11/9.
//  Copyright (c) 2015年 Lishukang. All rights reserved.
//

#import "SuggestViewController.h"

@interface SuggestViewController ()

@property (nonatomic,strong) UILabel *titleLabel;

@property (nonatomic,strong) UITextView *textView;

@end

@implementation SuggestViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"反馈建议";
    self.navigationItem.rightBarButtonItem = nil;
    self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
    UIImageView * imageView = [[UIImageView alloc] initWithFrame:self.view.bounds];
    
    imageView.contentMode = UIViewContentModeScaleAspectFill;
    imageView.image = [UIImage imageNamed:@"suixin_bg"];
    [self.view addSubview:imageView];
    
    self.navigationController.navigationBar.translucent = NO;
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed: @"white_back"] style:UIBarButtonItemStylePlain target:self action:@selector(back)];
    
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"提交" style:UIBarButtonItemStylePlain target:self action:@selector(tijiao)];
    // Do any additional setup after loading the view.
    
    [self subViewSetting];
}

- (void)tijiao{
    
    [MMProgressHUD setPresentationStyle:MMProgressHUDPresentationStyleShrink];
    [MMProgressHUD showWithTitle:@"请稍后" status:@"Loading..."];
    
    [NSThread sleepForTimeInterval:1.5];
    
    [MMProgressHUD dismissWithSuccess:@"提交完成" title:@"ok"];
    
    [NSThread sleepForTimeInterval:0.5];
    
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (void)back{
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (void)subViewSetting{
    self.titleLabel  = [[UILabel alloc] initWithFrame:CGRectMake(0, 10, self.view.bounds.size.width, 40)];
    self.titleLabel.font = [UIFont systemFontOfSize:15];
    self.titleLabel.text = @"  如果你有想对我们说的可以告诉告诉我们哦!";
    self.titleLabel.adjustsFontSizeToFitWidth = YES;
    self.titleLabel.textColor = [UIColor blackColor];
    self.titleLabel.backgroundColor = [UIColor colorWithRed:1 green:1 blue:1 alpha:0.7];
    self.titleLabel.layer.masksToBounds = YES;
    self.titleLabel.layer.cornerRadius = 8;
    
    [self.view addSubview:self.titleLabel];
    
    self.textView = [[UITextView alloc] initWithFrame:CGRectMake(0, 55, self.view.bounds.size.width, self.view.bounds.size.height/4)];
    self.textView.font = [UIFont systemFontOfSize:15];
    self.textView.text = @"我想说:";
    self.textView.textColor = [UIColor blackColor];
    self.textView.backgroundColor = [UIColor colorWithRed:1 green:1 blue:1 alpha:0.7];
    self.textView.layer.masksToBounds = YES;
    self.textView.layer.cornerRadius = 8;
    
    [self.view addSubview:self.textView];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
